-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: reroute workspace main urls to the dashboard when workspace is stopped #1386
Conversation
Signed-off-by: David Kwon <[email protected]>
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dkwon17 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## main #1386 +/- ##
==========================================
+ Coverage 61.89% 61.94% +0.05%
==========================================
Files 76 76
Lines 6248 6309 +61
==========================================
+ Hits 3867 3908 +41
- Misses 1998 2013 +15
- Partials 383 388 +5
Continue to review full report at Codecov.
|
This is a draft pull request for now, since I must still:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great starting point. For future, we should probably create a dedicated page on the user dashboard with the possibility of restarting the workspace
@dkwon17: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Closing in favour of #1392 |
Signed-off-by: David Kwon [email protected]
What does this PR do?
When a workspace is stopped, this PR updates the traefik such that the main url of the workspace is routed to the dashboard.
When the workspace is running, the traefik config looks like this: https://gist.githubusercontent.com/dkwon17/f094653c08776591924940c7f360b789/raw/5ed727aa13cd38dae925f57e4fc4d17416a5cca6/workspacestarted.yaml
When the workspace stops, this PR changes the traefik config to this: https://gist.githubusercontent.com/dkwon17/bcdece6b2d503c25df526496cf031992/raw/3a3487ea7ab30179bc694bf74a9622b1a48d489e/workspacestopped.yaml
In the new traefik config, the ReplacePathRegex middleware is used to change the workspace url path to a dashboard path.
Screenshot/screencast of this PR
In this gif we see that:
What issues does this PR fix or reference?
Part of eclipse-che/che#20599. In another PR, maybe we can redirect the user to some error page provided by the dashboard.
How to test this PR?
Tested on CRC with the following:
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.